package com.android.signhelper.http;

import com.android.signhelper.jsonbean.detail.Detail;
import com.android.signhelper.jsonbean.login.Login;
import com.android.signhelper.jsonbean.sign.Sign;

import java.util.Map;

import io.reactivex.Observable;
import retrofit2.http.Field;
import retrofit2.http.FieldMap;
import retrofit2.http.FormUrlEncoded;
import retrofit2.http.Header;
import retrofit2.http.POST;

/**
 * Created by ikata on 2018/11/15.
 */

public interface MyHttp {
    @FormUrlEncoded
    @POST("magus/appuserloginapi/userlogin")
    Observable<Login> login(@Field("params") String params);

    @POST("dorm/app/dormsign/sign/student/detail")
    Observable<Detail> getDetail(@Header("token") String token);

    @FormUrlEncoded
    @POST("dorm/app/dormsign/sign/student/edit")
    Observable<Sign> sign(@Header("token") String token, @FieldMap Map<String,String> body);

}